/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
    'Noto Color Emoji';
  font-size: 14px;
  line-height: 1.5715;
  color: rgba(0, 0, 0, 0.85);
  background-color: #f0f2f5;
}

#root {
  width: 100%;
  min-height: 100%;
}

/* ========== 滚动条样式 - 极简精致设计 ========== */

/* 全局滚动条 - 超细设计 */
* {
  scrollbar-width: thin !important;
  scrollbar-color: rgba(0, 0, 0, 0.1) transparent !important;
}

::-webkit-scrollbar {
  width: 4px !important;
  height: 4px !important;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1) !important;
  border-radius: 2px !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.2) !important;
}

::-webkit-scrollbar-track {
  background: transparent !important;
  border-radius: 2px !important;
}

/* 表格滚动条 - 超细设计 */
.ant-table,
.ant-table-wrapper,
.ant-table-container,
.ant-table-body,
.ant-table-content,
.ant-spin-container {
  scrollbar-width: thin !important;
  scrollbar-color: rgba(0, 0, 0, 0.08) transparent !important;
}

.ant-table ::-webkit-scrollbar,
.ant-table-wrapper ::-webkit-scrollbar,
.ant-table-container ::-webkit-scrollbar,
.ant-table-body ::-webkit-scrollbar,
.ant-table-content ::-webkit-scrollbar,
.ant-spin-container ::-webkit-scrollbar {
  width: 2px !important;
  height: 2px !important;
}

.ant-table ::-webkit-scrollbar-thumb,
.ant-table-wrapper ::-webkit-scrollbar-thumb,
.ant-table-container ::-webkit-scrollbar-thumb,
.ant-table-body ::-webkit-scrollbar-thumb,
.ant-table-content ::-webkit-scrollbar-thumb,
.ant-spin-container ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08) !important;
  border-radius: 1px !important;
  transition: all 0.15s ease !important;
}

.ant-table ::-webkit-scrollbar-thumb:hover,
.ant-table-wrapper ::-webkit-scrollbar-thumb:hover,
.ant-table-container ::-webkit-scrollbar-thumb:hover,
.ant-table-body ::-webkit-scrollbar-thumb:hover,
.ant-table-content ::-webkit-scrollbar-thumb:hover,
.ant-spin-container ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.15) !important;
}

.ant-table ::-webkit-scrollbar-track,
.ant-table-wrapper ::-webkit-scrollbar-track,
.ant-table-container ::-webkit-scrollbar-track,
.ant-table-body ::-webkit-scrollbar-track,
.ant-table-content ::-webkit-scrollbar-track,
.ant-spin-container ::-webkit-scrollbar-track {
  background: transparent !important;
  border-radius: 1px !important;
}

/* 表格横向滚动优化 */
.ant-table-body {
  overflow-x: auto !important;
  overflow-y: auto !important;
}

/* 深色模式下的滚动条 */
.dark * {
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent !important;
}

.dark ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15) !important;
}

.dark ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25) !important;
}

.dark ::-webkit-scrollbar-track {
  background: transparent !important;
}

.dark .ant-table ::-webkit-scrollbar-thumb,
.dark .ant-table-wrapper ::-webkit-scrollbar-thumb,
.dark .ant-table-body ::-webkit-scrollbar-thumb,
.dark .ant-table-content ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12) !important;
}

.dark .ant-table ::-webkit-scrollbar-thumb:hover,
.dark .ant-table-wrapper ::-webkit-scrollbar-thumb:hover,
.dark .ant-table-body ::-webkit-scrollbar-thumb:hover,
.dark .ant-table-content ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2) !important;
}

/* Modal 滚动条 */
.ant-modal-body::-webkit-scrollbar {
  width: 2px !important;
  height: 2px !important;
}

.ant-modal-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08) !important;
  border-radius: 1px !important;
}

.ant-modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.15) !important;
}

.ant-modal-body::-webkit-scrollbar-track {
  background: transparent !important;
}

/* Drawer 滚动条 */
.ant-drawer-body::-webkit-scrollbar {
  width: 2px !important;
  height: 2px !important;
}

.ant-drawer-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08) !important;
  border-radius: 1px !important;
}

.ant-drawer-body::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.15) !important;
}

.ant-drawer-body::-webkit-scrollbar-track {
  background: transparent !important;
}

/* 动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes aurora {
  0%, 100% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0.5;
  }
  33% {
    transform: translateY(-10%) translateX(10%) scale(1.1);
    opacity: 0.6;
  }
  66% {
    transform: translateY(10%) translateX(-10%) scale(0.9);
    opacity: 0.4;
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

.slide-in {
  animation: slideIn 0.5s ease-in-out;
}
